#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSerialPort>
#include <QSerialPortInfo>


QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:

    void on_pushButton_SendMsg_clicked();

    void on_pushButton_openclose_clicked();
    //接收串口数据槽函数
    void readData();

    void on_pushButton_clear_recv_text_clicked();

    void on_pushButton_clear_send_text_clicked();

private:
    Ui::MainWindow *ui;
    //串口类
    QSerialPort *my_serial;

};
#endif // MAINWINDOW_H
